from asyncio import sleep

from selenium import webdriver

options = webdriver.ChromeOptions()

options.add_argument('--headless')

options.add_argument('--window-size=1920x1080')

driver = webdriver.Chrome('D:\chromedriver_win32\chromedriver.exe', options=options)

driver.get('http://www.baidu.com')

# driver.maximize_window()

driver.save_screenshot('baidu1.png')

sleep(3)

driver.quit()
